<include file="Public/ace_header" />
<!-- 本页面逻辑 -->
<!-- 定制
非定制
旅社补充合同根据是否签署显示不一致
旅社签署情况根据是否签署显示不一致 -->
<div class="row">
    <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" style="padding-left: 10px;padding-right: 10px;">
        <input type="hidden" name="user_id" value="{:session('旅社')['id']}" />
        <input type="hidden" name="funding_type" value="{$_GET['funding_type']|default=$model['funding_type']}" />
        <input type="hidden" name="customized_id" value="{$_GET['customized_id']}" />
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="funding_type"> 筹单类型 </label>
            <div class="col-xs-12 col-sm-6">
                <span class="block input-icon input-icon-right">
                        <select  id="funding_type" class="width-100" disabled="">
                            <php> $funding_type = D(FundingType)->select(); </php>
                            <volist name="funding_type" id="vo">
                            <option value="{$vo['id']}" <if condition ="($_GET['funding_type'] neq '') && ($_GET['funding_type'] eq $vo['id']) || ($model['funding_type'] eq $vo['id'])"> selected </if>>{$vo['long_name']}</option>
                            </volist>
                        </select>
                        <i class=""></i>
                    </span>
            </div>
            <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="transaction_type"> 交易类型 </label>
            <div class="col-xs-12 col-sm-6">
                <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="交易类型" id="transaction_type" name="transaction_type"  value="{$_GET['transaction_type']|default=$model['transaction_type']}" validate-required="required:请填写交易类型" readonly/>
                        <i class=""></i>
                    </span>
            </div>
            <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
        </div>
        <if condition="$_GET['transaction_type'] eq '购买' || ($model['transaction_type'] eq '购买')"> 
              <div class="form-group is-allow-funding {$hidden}">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="funding_price"> 众筹底价 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="众筹价格" id="funding_price" name="funding_price"  value="{$model['funding_price']|default='0'}" validate-required="required:请填写众筹价格" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div>
        </if>

        <if condition="($_GET['transaction_type'] eq '定制') || ($model['transaction_type'] eq '定制')">
        <!-- 定制内容 -->
            <input type="hidden" class="width-100" id="already_num" name="already_num" value="{$model['already_num']|default='1'}" />
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="customized_price"> 定制价格 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="定制价格" id="customized_price" name="customized_price"  value="{$model['customized_price']|default=''}" validate-required="required:请填写定制价格" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="img"> 图片 </label>
            <div class="col-xs-12 col-sm-6">
                <span class="block input-icon input-icon-right">
                        <input type="file" class="width-100" placeholder="图片" id="img" name="img"  value="{$model['img']|default=''}"/>
                        <i class=""></i>
                    </span>
            </div>
            <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
        </div>
        <if condition="ACTION_NAME eq 'update'">
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="img"> </label>
            <div class="col-xs-12 col-sm-6">
                <span class="block input-icon input-icon-right">
                        <img src="__PUBLIC__/file/{$model['img']}" style="height: 10rem;width: 20rem;" />
                        <i class=""></i>
                    </span>
            </div>
            <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
        </div>
        </if>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="detail_wap"> wap详情 </label>
            <div class="col-xs-12 col-sm-6">
                <span class="block input-icon input-icon-right">
                        <textarea class="col-xs-12 col-sm-6 width-100" style="padding: 5px 4px;" rows="5" id="detail_wap" name="detail_wap" placeholder="wap详情" validate-required="required:请填写wap详情" >{$model["detail_wap"]|default=""}</textarea>
                        <i class=""></i>
                        <small style="color:gray;">为了让上传图片在手机中正常显示，请将图片宽度设置为100%</small>
                    </span>
            </div>
            <script type="text/javascript">
            var editor = UE.getEditor("detail_wap");
            </script>
            <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="detail_pc"> pc详情 </label>
            <div class="col-xs-12 col-sm-6">
                <span class="block input-icon input-icon-right">
                        <textarea class="col-xs-12 col-sm-6 width-100" style="padding: 5px 4px;" rows="5" id="detail_pc" name="detail_pc" placeholder="pc详情" validate-required="required:请填写pc详情" >{$model["detail_pc"]|default=""}</textarea>
                        <i class=""></i>
                    </span>
            </div>
            <script type="text/javascript">
            var editor = UE.getEditor("detail_pc");
            </script>
            <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
        </div>
        <if condition="ACTION_NAME neq create">
            <!-- 不是新创建 -->
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="user_contract"> 用户补充合同 </label>
                <div class="col-xs-12 col-sm-6">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            {$model["user_contract"]|html_entity_decode}
                        </div>
                    </div>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div>

            <if condition="($model['seller_contract_state'] eq '已签署') AND ($model['buyer_contract_state'] eq '已签署')">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="seller_contract"> 旅社补充合同 </label>
                <div class="col-xs-12 col-sm-6">
                    <div class="panel panel-default">
                      <div class="panel-body">
                            {$model["seller_contract"]|html_entity_decode}
                      </div>
                    </div>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div>
            <else/>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="seller_contract"> 旅社补充合同 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <textarea class="col-xs-12 col-sm-6 width-100" style="padding: 5px 4px;" rows="5" id="seller_contract" name="seller_contract" placeholder="旅社补充合同" validate-required="required:请填写旅社补充合同" >{$model["seller_contract"]|default=''}</textarea>
                        <i class=""></i>
                    </span>
                </div>
                <script type="text/javascript">var editor = UE.getEditor('seller_contract');</script>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            </if>

        <!--     <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="user_contract_state"> 游客合同签署情况 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="游客合同签署情况" id="user_contract_state" name="user_contract_state"  value="{$model['user_contract_state']|default=''}" validate-required="required:请填写游客合同签署情况" <if condition="ACTION_NAME eq 'update'">readonly</if>/>
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div> -->
            <if condition="$model['seller_contract_state'] eq '已签署'">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="seller_contract_state"> 商家合同签署情况 </label>
                    <div class="col-xs-12 col-sm-6">
                        <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" id="seller_contract_state" name="seller_contract_state"  value="{$model['seller_contract_state']|default=''}" <php> if (ACTION_NAME == 'update') { echo "readonly";}</php>/>
                    </span>
                    </div>
                    <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
                </div>
            <else/> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="seller_contract_state"> 旅社合同签署情况 </label>
                    <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                    <select name="seller_contract_state" id="seller_contract_state" class="width-100">
                         <option value="未签署">未签署</option>
                         <option value="已签署">已签署</option>
                    </select>
                    <i class=""></i>
                    </span>
                    </div>
                    <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
                </div>
            </if>
        </if>
         </if>
        <div class="clearfix form-actions">
            <div style="margin-left: 25%;">
                <button class="btn btn-info btn-sm" type="submit">
                    <i class="icon-ok bigger-110"></i> 下一步
                </button>
                &nbsp; &nbsp; &nbsp;
                <button class="btn btn-sm return" type="button">
                    <i class="icon-reply bigger-110"></i> 返回
                </button>
            </div>
        </div>
    </form>
</div>
<include file="Public/ace_footer" />
